<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style >
    div {
        position: relative;
        width: 400px;
        height: 40px;
        border: 1px solid #000;
    }
    div::after {
        content: "";
        position: absolute;
        top: 10px;
        right: 15px;
        width: 10px;
        height: 10px;
        border-bottom: 1px solid #000;
        border-right: 1px solid #000;
        transform: rotate(45deg);
        transition: all .2s;
    }
    div:hover::after {
        transform: rotate(225deg);
    }
</style>
<body>
    <div></div>
</body>
</html>